#include <stdio.h>
#include <stdlib.h>
int main()
{
    int a,b,c,d,f,score;
    a=b=c=d=f=0;
    scanf("%d",&score);
    //start
    if(score!=-1)
    {
        if(score>=90)
        {
            a++;
        }
        if(score<90&&score>=80)
        {
            b++;
        }
        if(score<80&&score>=70)
        {
            c++;
        }
        if(score>=60&&score<70)
        {
            d++;
        }
        if(score<60)
        {
            f++;
        }
    }
    while(1)
    {
        scanf("%d",&score);
        if(score==-1)
            break;
         if(score>=90)
        {
            a++;
        }
        if(score<90&&score>=80)
        {
            b++;
        }
        if(score<80&&score>=70)
        {
            c++;
        }
        if(score>=60&&score<70)
        {
            d++;
        }
        if(score<60)
        {
            f++;
        }
    }
    //end
    printf("A: %d\nB: %d\nC: %d\nD: %d\nF: %d\n",a,b,c,d,f);
    return 0;
}
